'''
cookie :保持状态的
1.cookie会失效
2.每个接口都要带着cookie信息。
代码维护不方便。
'''

import requests

#  没有登录时，返回的是登录页面
url = "https://www.bagevent.com/account/dashboard"
r = requests.get(url)
print(r.text)

# 登录后，返回用户的个人统计页面
hd = {"Cookie": '_ga=GA1.2.1822255776.1627107690; Hm_lvt_1fc37bec18db735c69ebe77d923b3ab9=1627107690; BAG_EVENT_TOKEN_=02de735f68204d51009e7edda78e58c13a3fcdd1; BAG_EVENT_CK_KEY_="2780487875@qq.com"; BAG_EVENT_CK_TOKEN_=2440f5d17af838308ba4b390db81af38; __auc=3ce3d06717ad72d0d8db49f8261; MEIQIA_TRACK_ID=1vkYrq0keABigqBx5C4BYYqClOV; MEIQIA_VISIT_ID=1vkYrkrJtwmD2rg4wg59kuKxO5a; 1vkYrq0keABigqBx5C4BYYqClOV=undefined; JSESSIONID=54D35B101966E69E26AA46CABB340CFC; BAGSESSIONID=4478231a-4438-423e-9999-8f5ab782be92; __asc=c5aaf6ec17ae19d2fb7406e87b1; _gid=GA1.2.1051804286.1627282813; Hm_lpvt_1fc37bec18db735c69ebe77d923b3ab9=1627282813'}
r = requests.get(url,headers=hd)
print(r.text)